package Homework4;

import java.util.*;

public class Homework4_3_TestRegularPolygon {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n;
        double side,x,y;
        RegularPolygon polygon1 = new RegularPolygon();
        n = input.nextInt();
        side = input.nextDouble();
        RegularPolygon polygon2 = new RegularPolygon(n, side);
        n = input.nextInt();
        side = input.nextDouble();
        x = input.nextDouble();
        y = input.nextDouble();
        RegularPolygon polygon3 = new RegularPolygon(n, side, x, y);
        System.out.println("Polygon 1 perimeter: " +
                polygon1.getPerimeter());
        System.out.println("Polygon 1 area: " + polygon1.getArea());
        System.out.println("Polygon 2 perimeter: " +
                polygon2.getPerimeter());
        System.out.println("Polygon 2 area: " + polygon2.getArea());
        System.out.println("Polygon 3 perimeter: " +
                polygon3.getPerimeter());
        System.out.println("Polygon 3 area: " + polygon3.getArea());
    }
}
